AC_INIT([pesi], [0.1], [todd.fisher@gmail.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC
AC_PROG_CXX
AC_HEADER_STDC
AC_C_CONST
AC_C_INLINE
AC_HEADER_TIME
AC_CHECK_HEADERS(fcntl.h stdarg.h regex.h getopt.h)

AC_CHECK_LIB(event, evhttp_start, [], [
  echo "You need to have libevent installed: http://monkey.org/~provos/libevent/"
  exit -1
])
AC_CHECK_LIB(event, evhttp_free, [], [
  echo "You need to have libevent installed: http://monkey.org/~provos/libevent/"
  exit -1
])
AC_CHECK_LIB(event, evhttp_send_reply_chunk, [], [
  echo "You need to have libevent installed: http://monkey.org/~provos/libevent/"
  exit -1
])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([
  Makefile
  src/Makefile
])
AC_OUTPUT
